package com.jingdianjichi.subject.common.enums;

import lombok.Getter;

/**
 * 题目类型枚举
 * 1单选 2多选 3、判断 4、简答
 */

@Getter
public enum SubjectTypeInfoEnum {
    RADIO(1,"单选"),
    MULTIPLE(2,"多选"),
    JUDGE(3,"判断"),
    BRIEF(4,"简答");


    public  int code;
    public  String desc;
    SubjectTypeInfoEnum(int code, String desc){
        this.code=code;
        this.desc=desc;
    }
    public  static SubjectTypeInfoEnum getByCode(int codeVal){
        for (SubjectTypeInfoEnum resultCodeEnum: SubjectTypeInfoEnum.values()) {
            if (resultCodeEnum.code==codeVal){
                return resultCodeEnum;
            }
        }
        return  null;
    }
}
